/**
 * 
 */
package com.taobao.spring.aop;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;

import com.taobao.spring.aop.interfaces.IntroductionTestInterface;
import com.taobao.spring.aop.interfaces.UsageTracked;

/**
 * @author tianping.czp
 * 
 */
public class Test {

	public static void main(String[] args) {
		String[] locations = { "resource/applicationContext.xml" };
		ApplicationContext context = new FileSystemXmlApplicationContext(
				locations);
		

		// -- introduction --
		// IntroductionTestInterface introductionTestInterface =
		// (IntroductionTestInterface)
		// context.getBean("introductionTestInterface");
		// introductionTestInterface.test();
		// UsageTracked ut = (UsageTracked) introductionTestInterface;
		// ut.record();
		
		// -- advice --
		// TestClass testClass = (TestClass) context.getBean("testClass");
		// System.out.println(testClass);
		 TargetObject to = (TargetObject) context.getBean("targetObject");
		 to.method1();
		// to.method2("test");
		// to.method3();
	}
}
